package org.example.opus.controller;


import io.swagger.v3.oas.annotations.Operation;
import org.example.ai.model.entity.Works;
import org.example.ai.result.Result;

import org.example.opus.service.IAssistantFunctionsService;
import org.example.opus.service.IWorksService;
import org.example.pojo.AssistantFunctions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  我的模块 助手页面表 前端控制器
 * </p>
 *
 * @author author
 * @since 2025-02-08
 */
@RestController
@RequestMapping("/works/assistant")
public class AssistantFunctionsController {

    @Autowired
    private IAssistantFunctionsService assistantFunctionsService;

    @Operation(summary = "助手列表")
    @GetMapping("/getAssistant/{functionId}")
    public Result getAssistant(@PathVariable Integer functionId){
        List<AssistantFunctions> assistantFunctions = assistantFunctionsService.getAssistant(functionId);
        return Result.ok(assistantFunctions);
    }

}
